package com.hc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 登录历史
 *
 * @author 梁云亮
 */
@ApiModel(value = "Domain:LoginHistory")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_login_history")
public class LoginHistory implements Serializable {
    private static final long serialVersionUID = -6032318826411192083L;
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "编号")
    private Integer id;

    /**
     * 用户编号
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "用户编号")
    private Integer userId;

    /**
     * 登录设备：app-1，小程序-2，PC网页-3，手机网页-4
     */
    @TableField(value = "device")
    @ApiModelProperty(value = "登录设备：app-1，小程序-2，PC网页-3，手机网页-4")
    private Integer device;

    /**
     * 登录时间
     */
    @TableField(value = "login_time")
    @ApiModelProperty(value = "登录时间")
    private LocalDateTime loginTime;

    /**
     * 登录IP
     */
    @TableField(value = "login_ip")
    @ApiModelProperty(value = "登录IP")
    private String loginIp;

    /**
     * 登出时间
     */
    @TableField(value = "logout_time")
    @ApiModelProperty(value = "登出时间")
    private LocalDateTime logoutTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

}
